The BrightnessScale was trying to be smart by not notifying changes of
its value when an action on it (stepUp, stepDown, cycleUp, set value)
resulted in no change.
It turns out that users do want to see an OSD even when their action
resulted in no change.
Always notify about attempted changes instead.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8770
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3941>
}
_setValue(value) {
- value = Math.clamp(value, 0.0, 1.0);
- if (Math.abs(value - this._value) < SCALE_VALUE_CHANGE_EPSILON)
- return;
- this._value = value;
+ this._value = Math.clamp(value, 0.0, 1.0);
this.notify('value');
}
});